#pragma once

#include "Control.h"


class GUI_API CPicture :	public CControl
{
public:
	CPicture(void);
	CPicture(UINT nID);
	CPicture(wstring strCaption,UINT nID);
	CPicture(DWORD dwStyle, wstring strCaption,const CRect &rc, UINT nID);
	CPicture(DWORD dwStyle, wstring strCaption, int x, int y, int cx, int cy, UINT nID);
	virtual ~CPicture(void);
	virtual void Paint(CDC* pDC);

	inline void SetPic(HBITMAP hBitmap)
	{
		if(hBitmap)
		{
			m_bmpPic.Attach(hBitmap);
		}
	}

	inline HBITMAP  GetPic()
	{
		return m_bmpPic.m_hBitmap;
	}

	inline void SetTransParam(BOOL bTrans,COLORREF clrTrans)
	{
		m_bTransparent = bTrans;
		m_clrTransparent = clrTrans;
	}

	inline void SetTransparen(BOOL bTrans)
	{
	    m_bTransparent=bTrans;
	}
private:
	CBitmap  m_bmpPic;
	BOOL     m_bTransparent;
	COLORREF m_clrTransparent;

protected:
};
